<template>
  <div class="offline">
    <div class="content">
      <div class="title">如何使设备上线?</div>
      <div class="body">
        <p>1.确认设备正常通电。</p>
        <p>2.确认环境网络正常使用。</p>
        <p>
          3.如步骤1、2未能解决问题，可尝试在和家亲中删除设备并重新绑定设备。
        </p>
      </div>
      <div class="btn" @click="toBack">我知道了</div>
    </div>
  </div>
</template>

<script setup>
import { watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
const route = useRoute()

const router = useRouter()
const toBack = () => {
  router.go(-1)
}
watch(
  () => route.path,
  (to, from) => {
    window.WebViewJavascriptBridge.callHandler('setToolbarTitle', '', null)
  },
  {
    immediate: true,
    deep: true
  }
)
</script>

<style lang="less" scoped>
.offline {
  height: 100vh;
  background-color: #f2f5f5;
  .content {
    height: calc(100vh - 200px);
    padding: 36px 32px 160px;
    display: flex;
    box-sizing: border-box;
    flex-direction: column;
  }
  .title {
    color: var(--title-color);
    font-size: 48px;
    margin-bottom: 30px;
  }
  .body {
    flex: 1;
    p {
      color: var(--title-color);
      font-size: 28px;
      margin: 8px 0;
    }
  }
  .btn {
    width: calc(100% - 76px);
    background-image: linear-gradient(to right, #00d8af, #00c5a1);
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 34px;
    border-radius: 80px;
    margin-left: 38px;
  }
}
</style>
